﻿<UserControl x:Class="BlobTowerDefense.Pages.Controls.ControlsSettings_Audio"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <UserControl.Resources>
        <Storyboard x:Name="animationIn_LeftToRight">
            <DoubleAnimation From="-200" To="0" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="animationIn_RightToLeft">
            <DoubleAnimation From="200" To="0" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animationOut_LeftToRight">
            <DoubleAnimation From="0" To="200" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="animationOut_RightToLeft">
            <DoubleAnimation From="0" To="-200" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>

    <StackPanel x:Name="LayoutRoot"
                Orientation="Vertical">
        <StackPanel.RenderTransform>
            <TranslateTransform x:Name="translateTransform"/>
        </StackPanel.RenderTransform>
        <TextBlock Name="TextBlock_VolumeMaster_Label" 
                   Text="{Binding ConverterParameter=Settings_Label_VolumeMaster, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <Grid Name="Grid_VolumeMaster">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Name="Button_Mute"
                    Grid.Column="0"
                    VerticalAlignment="Bottom"
                    Width="100"
                    Height="100"
                    Click="Button_Mute_Click">
                <Button.Background>
                    <ImageBrush ImageSource="../../Images/OtherIcons/mute.png"/>
                </Button.Background>
            </Button>
            <Slider Name="Slider_VolumeMaster"
                    Grid.Column="1"
                    Minimum="0"
                    Maximum="100"
                    ValueChanged="Slider_VolumeMaster_ValueChanged" />
            <TextBlock Name="TextBlock_VolumeMaster"
                       Grid.Column="1"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Bottom"
                       Text="{Binding Value, 
                              Mode=OneWay, 
                              StringFormat=0,
                              ElementName=Slider_VolumeMaster}"/>            
        </Grid>

        <TextBlock Name="TextBlock_VolumeMusic_Label" 
                   Text="{Binding ConverterParameter=Settings_Label_VolumeMusic, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <Grid Name="Grid_VolumeMusic">
            <Slider Name="Slider_VolumeMusic"
                    Minimum="0"
                    Maximum="100"
                    ValueChanged="Slider_VolumeMusic_ValueChanged"/>
            <TextBlock Name="TextBlock_VolumeMusic"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Bottom"
                       Text="{Binding Value, 
                              Mode=OneWay, 
                              StringFormat=0,
                              ElementName=Slider_VolumeMusic}"/>
        </Grid>

        <TextBlock Name="TextBlock_VolumeSounds_Label" 
                   Text="{Binding ConverterParameter=Settings_Label_VolumeSounds, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <Grid Name="Grid_VolumeSounds">
            <Slider Name="Slider_VolumeSounds"
                    Minimum="0"
                    Maximum="100"
                    ValueChanged="Slider_VolumeSounds_ValueChanged"/>
            <TextBlock Name="TextBlock_VolumeSounds"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Bottom"
                       Text="{Binding Value, 
                              Mode=OneWay, 
                              StringFormat=0,
                              ElementName=Slider_VolumeSounds}"/>
        </Grid>
    </StackPanel>
</UserControl>
